package com.zzg.springboot.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.zzg.springboot.entity.User;

public interface UserDao extends JpaRepository<User,Long> {
	

	@Query(value="select user.id, user.name, user.pwd, user.address, user.sex, user.birthday from user"
			+ " where user.id = :id", nativeQuery = true)
	public User getUserEntityById(@Param("id") long id);
	
	@Query(value="select user.id, user.name, user.pwd, user.address, user.sex, user.birthday from user "
			+ " where user.id = :id", nativeQuery = true)
	public User getSetById(@Param("id") long id);
	



}
